-
-
Notifications
You must be signed in to change notification settings - Fork 502
Add to accept 4x4 lua table in setElementBoneMatrix function #3844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| } | ||
|
|
||
| bool CLuaPedDefs::SetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, CMatrix boneMatrix) | ||
| bool CLuaPedDefs::SetElementBoneMatrix(lua_State* const luaVM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wont work for argument parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case it would be through LUA_DECLARE, correct? I've made the change, if that's all it is, I'll send.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you would have to remove argument parser from the function list. Try to find a different way instead of not using argparser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to follow the declaration pattern of other functions. I've sent the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check if it works as intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I never send a commit without testing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You didnt check your first commit though 😒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I did. All the parameters were working and the function worked correctly. I only changed it because you told me to, but it was already working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you say so, but please try figuring out a way with ArgumentParser and not lua bindings if possible
| return std::make_tuple(x, y, z, w); | ||
| } | ||
|
|
||
| bool CLuaPedDefs::SetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, CMatrix boneMatrix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just implement that "CMatrix" can be read from 4x4 lua table and don't touch this file at all
|
Why do you need to use the old argument parser here? Can you not use Anyway, I think @CrosRoad95 suggestion is a more sensible approach as it is wider reaching, for around the same amount of effort. |
I think it's really the best solution to change the I've made this change where it will also allow you to pass a 4x4 lua table, but I haven't sent it yet, because I want to make sure that the best option would be to open another PR, if so, I'll open it by making this change. |
This PR will allow you to pass 4x4 lua tables in the parameter of the setElementBoneMatrix function, currently it only accepts one Matrix, which makes it difficult to use this function.